package org.jeecg.modules.rental.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 卡券订单明细
 * @Author: sean
 * @Date:   2024-10-14
 * @Version: V1.0
 */
@Data
@TableName("rental_coupon_order_detail")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_coupon_order_detail对象", description="卡券订单明细")
public class RentalCouponOrderDetail implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
	/**订单id*/
	@Excel(name = "订单id", width = 15)
    @ApiModelProperty(value = "订单id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;
	/**卡券配置id*/
	@Excel(name = "卡券配置id", width = 15)
    @ApiModelProperty(value = "卡券配置id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long couponConfigId;
	/**卡券面值*/
	@Excel(name = "卡券面值", width = 15)
    @ApiModelProperty(value = "卡券面值")
    private String configName;
	/**卡券类别*/
	@Excel(name = "卡券类别", width = 15)
    @ApiModelProperty(value = "卡券类别")
    private String categoryCode;
	/**价格*/
	@Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
    /**卡券配色*/
    @Excel(name = "卡券配色", width = 15)
    @ApiModelProperty(value = "卡券配色")
    private String color;
    /**价格*/
    @Excel(name = "最低消费", width = 15)
    @ApiModelProperty(value = "最低消费")
    private BigDecimal minAmount;
    /**有效天数*/
    @Excel(name = "有效天数", width = 15)
    @ApiModelProperty(value = "有效天数")
    private Integer validDays;
	/**面值*/
	@Excel(name = "面值", width = 15)
    @ApiModelProperty(value = "面值")
    private BigDecimal faceValue;
	/**数量*/
	@Excel(name = "数量", width = 15)
    @ApiModelProperty(value = "数量")
    private Integer num;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**是否删除（0：否、1：是）*/
	@Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;
}
